package com.manage.service;

import com.manage.dao.ProfileDao;
import com.manage.pojo.Page;
import com.manage.pojo.Profile;
import com.sun.javaws.jnl.PropertyDesc;

import java.util.List;

/**
 * @author 汤奇
 * @version V1.0
 * @Project BookPro
 * @Package com.manage.service
 * @Description:
 * @Date 2022/5/27 14:23
 */
public class ProfileServiceImpl implements ProfileService {
    private ProfileDao profileDao;


    public ProfileServiceImpl(ProfileDao profileDao) {
        this.profileDao = profileDao;
    }

    @Override
    public List<Profile> findAllPage(Page page) {
        List<Profile> list = profileDao.findAllByPage(page);
        return list;
    }

    @Override
    public int findAllPageCount() {
        int count = profileDao.findAllPageCount();
        return count;
    }

    @Override
    public Profile findById(int id) {
        Profile profile = profileDao.findById(id);
        return profile;
    }

    @Override
    public int updateById(Profile profile, int id) {
        int count = profileDao.updateById(profile,id);
        return count;
    }
}
